package pers.vic.system.shiro;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

import org.apache.shiro.web.filter.AccessControlFilter;
import org.springframework.stereotype.Component;

@Component( value = "testF")
public class TestAuthenticationFilter extends AccessControlFilter{



	@Override
	protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue)
			throws Exception {
		HttpServletRequest httpServletRequest = (HttpServletRequest) request;
		httpServletRequest.getSession().getAttribute("aa");
		System.out.println("......................");
		return true;
	}

	@Override
	protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
		HttpServletRequest httpServletRequest = (HttpServletRequest) request;
		httpServletRequest.getSession().getAttribute("aa");
		System.out.println("......................");
		return true;
	}

	

}
